/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ensisa.sunspot.event;

/**
 *
 * @author michel
 */
public class TripleEvent extends AbstractEvent {

    private double x;
    private double y;
    private double z;

    public TripleEvent (int major, int minor) {
        super (major, minor);
    }

    public double getX () {
        return x;
    }

    public double getY () {
        return y;
    }

    public double getZ () {
        return z;
    }

    public void setX (double x) {
        this.x = x;
    }

    public void setY (double y) {
        this.y = y;
    }

    public void setZ (double z) {
        this.z = z;
    }

    public String toString () {
        StringBuffer tmp = new StringBuffer ();
        tmp.append (super.toString());
        tmp.append("[ ");
        tmp.append(x);
        tmp.append(" ");
        tmp.append(y);
        tmp.append(" ");
        tmp.append(z);
        tmp.append(" ]");
        return tmp.toString();
    }

    public IEvent clone() {
        TripleEvent copy = new TripleEvent (getMajor(), getMinor());
        copy.setState(getState());
        copy.setTimeStamp(getTimeStamp());
        copy.setX(getX());
        copy.setY(getY());
        copy.setZ(getZ());
        return copy;
    }

}
